<div class="container-fluid" style="margin-top: 10px;">

    <div class="row">
        <form id="condition-form" class="mt10" method="post" action="addConditionSession" enctype="multipart/form-data">
            <div class="col-xs-12" >
                {:Form('text',['title'=>'工程编号','name'=>'CONS_NO','value'=>$Think.session.list_condition_construction.CONS_NO,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'项目名称','name'=>'CONS_NAME','value'=>$Think.session.list_condition_construction.CONS_NAME,'col'=>'col-xs-12'])}
                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                累计完成投资 从
                            </span>
                        <input name="ACC_FEE_START"  value="{$Think.session.list_condition_construction.ACC_FEE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="ACC_FEE_END"  value="{$Think.session.list_condition_construction.ACC_FEE_END}"  type="text" class="form-control">
                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                投入使用日期 从
                            </span>
                        <input name="USE_DATE_START"  value="{$Think.session.list_condition_construction.USE_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="USE_DATE_END"  value="{$Think.session.list_condition_construction.USE_DATE_END}"  type="text" class="form-control">
                    </div>
                </div>
                
            <div class="col-xs-12" style="margin-top: 30px;text-align: center">
                <button onclick="search()" type="button" class="btn btn-info">查询</button>
                <button type="reset" class="btn btn-default" >重置</button>
                <button type="button" onclick="resetAll()" class="btn btn-danger" >清空</button>
            </div>
        </form>
    </div>
</div>

<script>
    $(function () {
        $("[name='USE_DATE_START']").flatpickr();
        $("[name='USE_DATE_END']").flatpickr();
    })
    function search() {
        $("#condition-form").ajaxSubmit(function (res) {
            console.log(res)
            var json = JSON.parse(res);
            if (json['code']=='200') {
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
                parent.refreshTable();
            }
        })
    }
    function resetAll() {
        $(':input','#condition-form')
            .not(':button, :submit, :reset, :hidden')
            .val('')
            .removeAttr('checked')
            .removeAttr('selected');
    }

</script>